package actives;

import java.awt.event.ActionEvent;

import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;

public class FishingActive extends Active {

	public FishingActive(Player player) {
		super(player);
		player.sendMessage("Fishing active primed");
		timer.start();
	}

	@Override
	public void actionPerformed(ActionEvent event) {
	}

	private void reel(Player target) {
		Location playerLocation = player.getLocation();
		Location targetLocation = target.getLocation();
		Location distance = playerLocation.subtract(targetLocation);
		double multiplier = playerLocation.distance(targetLocation);
		double x = distance.getX() / multiplier;
		double y = distance.getY() / multiplier;
		double z = distance.getZ() / multiplier;
		target.setVelocity(new Vector(x, y, z));
	}
}
